<template>
  <div>
    <div class="lcbox" :style="acolor[id]">
      <p></p>
      <h2>学习记事本</h2>
      <p><i class="el-icon-s-fold" @click="showPopup"></i></p>
    </div>
  </div>
</template>

<script>
import Bus from "@/Bus";
export default {
  components: {},
  name: "",
  data() {
    return {
      show: false,
      id:0,
      acolor:[
        "background-color: pink",
        "background-color: blue;",
        "background-color: yellow;"
      ]
    };
  },
  mounted() {
    Bus.$on('bc',(data)=>(this.id=data))
  },
  methods: {
    //左侧导航显示隐藏
    showPopup() {
      this.show = !this.show;
      Bus.$emit("showPopup", this.show);
    },
  },
  computed: {},
  watch: {},
};
</script>

<style lang="scss" scoped>
.lcbox {
  width: 100%;
  height: 80px;
  // background-color: pink;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  h2 {
    font-size: 32px;
    color: white;
  }
  p {
    font-size: 24px;
    color: white;
  }
}
</style>
